﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Content/Master.Master" Inherits="System.Web.Mvc.ViewPage<SCS.Core.Models.Collection.ProductTypePropertyCollection>" %>
<%@ Import Namespace="SCS.Core" %>
<%@ Import Namespace="SCS.Core.Models" %>
<%@ Import Namespace="SCS.Core.ViewModels" %>
<%@ Import Namespace="SCS.Core.Controllers" %>
<%@ Import Namespace="SCSService" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Chi tiết kiểu của thuộc tính
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
        function TypeProdpertiesSelect(dropDownList) {
            var selectedReport = dropDownList.options[dropDownList.selectedIndex];
            var selects = selectedReport.value;

            if (document.all || document.getElementById)
                document.getElementById('TypePropertiesID').value = selects;
            else
                document.getElementById('TypePropertiesID').setAttribute("value", selects);
        }
        function StatusSelect(dropDownList) {
            var selectedReport = dropDownList.options[dropDownList.selectedIndex];
            var selects = selectedReport.value;

            if (document.all || document.getElementById)
                document.getElementById('Status').value = selects;
            else
                document.getElementById('Status').setAttribute("value", selects);
        }
</script>
     <% using (Html.BeginForm("SaveAddProductTypeProperties", "Stock", FormMethod.Post, new { id = "sendFileForm", enctype = "multipart/form-data" }))
   {%>
    <div class="clear"></div>
    <div class="column full">
    <div class="box ">
		<h2 class="box-header">	</h2>
		<div class="box-content">
             
            <%=Html.HiddenFor(m=>m.ProductID) %> 
                                                      
            <label class="form-label"> Kiểu thuộc tính  </label>
            <%=Html.DropDownListFor(m=>m.TypePropertiesID, (SelectList)ViewData["ListTypeProduct"],"--Chọn kiểu thuộc tính--", new { onchange = "TypeProdpertiesSelect(this);" })%>
            <%=Html.HiddenFor(m=>m.TypePropertiesID) %>
                                        

            <label class="form-label"> Trạng thái </label>
            <%
            List<SelectListItem> statusSearch = new List<SelectListItem>();
            statusSearch.AddRange(new SelectListItem[] { 
            new SelectListItem{ Text = "--Chọn trạng thái--",Value="-1"},    
            new SelectListItem{ Text = "Kích hoạt", Value = "1" },
            new SelectListItem{ Text = "Không kích hoạt", Value = "0" }
            });
            %>

            <%=Html.DropDownListFor(m => m.Status, statusSearch, new { onchange = "StatusSelect(this);" })%> 
            <%=Html.HiddenFor(m=>m.Status) %>
                                        
            <p>
                <%=ViewData["Result"]%>
                </p>

            <input id="btnSave" type="submit" value="Lưu" class="button themed" />
               
	    </div>
	</div>
    <div class="clear"></div>
    </div>    
<% } %>

</asp:Content>
